home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / PRGMANIA / XA_6S / SOURCE / OBJECTS.SRC / IBOX.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-08  |  1.1 KB  |  51 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #include <stdlib.h>
  9. #include <osbind.h>
  10. #ifdef LATTICE
  11. #undef abs        /* MiNTlib (PL46) #define is buggy! */
  12. #define abs(i)    __builtin_abs(i)
  13. #endif
  14. #include "XA_DEFS.H"
  15. #include "XA_TYPES.H"
  16. #include "XA_GLOBL.H"
  17. #include "K_DEFS.H"
  18. #include "RECTLIST.H"
  19. #include "BOX3D.H"
  20. #include "objects.h"
  21.  
  22. /*
  23.     Draw a plain hollow ibox
  24. */
  25. void d_g_ibox(ODC_PARM *odc_p)
  26. {
  27.     OBJECT *ob=odc_p->tree + odc_p->object;
  28.     short parent_x=odc_p->parent_x, parent_y=odc_p->parent_y;
  29.     OBJC_COLORWORD *colourword;
  30.     unsigned short zap;
  31.     short border_thick=0;
  32.  
  33.     colourword=(OBJC_COLORWORD*)&zap;
  34.     zap=(unsigned short)ob->ob_spec&0xffff;
  35.     border_thick=(short)((((unsigned long)ob->ob_spec)&0xff0000L)>>16);
  36.     if (border_thick&128)
  37.         border_thick=-(1+(border_thick^0xff));
  38.  
  39.     shadow_object(ob, parent_x, parent_y, colourword, border_thick);
  40.     set_colours(ob, colourword);
  41.  
  42.     if (border_thick)            /* Display a border? */
  43.     {
  44.         draw_2d_box(parent_x+ob->ob_x, parent_y+ob->ob_y, 
  45.                     ob->ob_width, ob->ob_height, 
  46.                     border_thick, colourword->borderc);
  47.     }
  48.  
  49. }
  50.  
  51.